﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace bai_tap
{
    class Program
    {
        static void Main(string[] args)
        {
            int c, d, e, f;
            do
            {                          //Nhap Phan so
                Console.Write("Tu Phan so 1: ");
                c = int.Parse(Console.ReadLine());
                Console.Write("Mau Phan so 1: ");
                d = int.Parse(Console.ReadLine());
                Console.Write("Tu Phan so 2: ");
                e = int.Parse(Console.ReadLine());
                Console.Write("Mau Phan so 2: ");
                f = int.Parse(Console.ReadLine());
                if (d == 0 || f == 0)
                {
                    Console.WriteLine("Loi !!! Nhap Mau So Phai Khac 0.\a\a");
                    Console.WriteLine();
                }


                else
                    break;
            } while (true);
            cphanso a = new cphanso(c, d);
            a.xuat();
            cphanso b = new cphanso(e, f);
            b.xuat();
            // phep cong..
            cphanso ketqua = a.cong(b);
            Console.Write("Phep Cong: ");
            ketqua.xuat();
            //phep nhan...
            Console.Write("Phep Nhan: ");
            ketqua = a.nhan(b);
            ketqua.xuat();
            //phep chia....
            Console.Write("phep chia: ");
            ketqua = a.chia(b);
            ketqua.xuat();
            //phep nhan....
            Console.Write("tru:");
            ketqua = a.tru(b);
            ketqua.xuat();

           
            Console.ReadLine();
           
            
        }
    }
}
